<?php $this->load->view('header'); ?>
<?php $this->load->view('menus'); ?>

<br />
<? foreach( $this->Departments->fetch_all() as $department ) { ?>
	<h3><a href="<?=site_url('department/view/id/'.$department->department_id);?>"><?=$department->name?></a></h3>
	
	<? if( $this->Account->is_admin() ) { ?>
	<ul class="shadetabs">
	<li><a href="<?=site_url('account/create');?>">Add account</a></li>
	<li><a href="<?=site_url('department/delete/id/'.$department->department_id);?>"
		onclick="return confirm('Are you sure?')">Delete</a></li>
	</ul>
	<div class="curlycontainer">
	<div class="innerdiv">
	<?=$department->description?>
	</div>
	</div>

	<? } ?>

	<hr />
<? } ?>



<?php $this->load->view('footer'); ?>
